using System;
using System.Data.Entity.ModelConfiguration;
using System.Data.Common;
using System.Data.Entity;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using Dal.Entities;

namespace Dal.Mapping
{
	public class Doc3Map : EntityTypeConfiguration<Doc3>
	{
		public Doc3Map()
		{
			// Primary Key
			this.HasKey(t => t.DocID);

			// Properties
			this.Property(t => t.DocID)
				.HasDatabaseGeneratedOption(DatabaseGeneratedOption.None);
				
			this.Property(t => t.T1BeforeBreakfastArray)
				.HasMaxLength(100);
				
			this.Property(t => t.T1BeforeLunchArray)
				.HasMaxLength(100);
				
			this.Property(t => t.T1BeforeDinnerArray)
				.HasMaxLength(100);
				
			this.Property(t => t.T1NuoHePingArray)
				.HasMaxLength(100);
				
			this.Property(t => t.T2EmptyArray)
				.HasMaxLength(100);
				
			this.Property(t => t.T2AfterBreakfastArray)
				.HasMaxLength(100);
				
			this.Property(t => t.T2BeforeLunchArray)
				.HasMaxLength(100);
				
			this.Property(t => t.T2AfterLunchArray)
				.HasMaxLength(100);
				
			this.Property(t => t.T2BeforeDinnerArray)
				.HasMaxLength(100);
				
			this.Property(t => t.T2AfterDinnerArray)
				.HasMaxLength(100);
				
			this.Property(t => t.T2BeforeSleep)
				.HasMaxLength(100);
				
			this.Property(t => t.Introduce)
				.HasMaxLength(500);
				
			this.Property(t => t.AdjustCase_2)
				.HasMaxLength(50);
				
			this.Property(t => t.HasLowBloodSugar_2)
				.HasMaxLength(50);
				
			this.Property(t => t.Satisfied_2)
				.HasMaxLength(50);
				
			this.Property(t => t.AdditionNuoHeRuiBeforeBreakfast)
				.HasMaxLength(50);
				
			this.Property(t => t.AdditionNuoHeRuiBeforeLunch)
				.HasMaxLength(50);
				
			this.Property(t => t.AdditionNuoHeRuiBeforeDinner)
				.HasMaxLength(50);
				
			this.Property(t => t.AdditionNuoHePing)
				.HasMaxLength(50);
				
			this.Property(t => t.AdditionCaseQiTa)
				.HasMaxLength(50);
				
			this.Property(t => t.AdditionLowBloodSugarFrequence)
				.HasMaxLength(50);
				
			// Table & Column Mappings
			this.ToTable("Doc3");
			this.Property(t => t.DocID).HasColumnName("DocID");
			this.Property(t => t.BeforeBreakfast_2).HasColumnName("BeforeBreakfast_2");
			this.Property(t => t.BeforeLunch_2).HasColumnName("BeforeLunch_2");
			this.Property(t => t.BeforeDinner_2).HasColumnName("BeforeDinner_2");
			this.Property(t => t.BeforeSleep).HasColumnName("BeforeSleep");
			this.Property(t => t.T1BeforeBreakfastArray).HasColumnName("T1BeforeBreakfastArray");
			this.Property(t => t.T1BeforeLunchArray).HasColumnName("T1BeforeLunchArray");
			this.Property(t => t.T1BeforeDinnerArray).HasColumnName("T1BeforeDinnerArray");
			this.Property(t => t.T1NuoHePingArray).HasColumnName("T1NuoHePingArray");
			this.Property(t => t.T2EmptyArray).HasColumnName("T2EmptyArray");
			this.Property(t => t.T2AfterBreakfastArray).HasColumnName("T2AfterBreakfastArray");
			this.Property(t => t.T2BeforeLunchArray).HasColumnName("T2BeforeLunchArray");
			this.Property(t => t.T2AfterLunchArray).HasColumnName("T2AfterLunchArray");
			this.Property(t => t.T2BeforeDinnerArray).HasColumnName("T2BeforeDinnerArray");
			this.Property(t => t.T2AfterDinnerArray).HasColumnName("T2AfterDinnerArray");
			this.Property(t => t.T2BeforeSleep).HasColumnName("T2BeforeSleep");
			this.Property(t => t.Introduce).HasColumnName("Introduce");
			this.Property(t => t.AdjustCase_2).HasColumnName("AdjustCase_2");
			this.Property(t => t.Effect_2).HasColumnName("Effect_2");
			this.Property(t => t.HasLowBloodSugar_2).HasColumnName("HasLowBloodSugar_2");
			this.Property(t => t.Satisfied_2).HasColumnName("Satisfied_2");
			this.Property(t => t.AdditionNuoHeRuiBeforeBreakfast).HasColumnName("AdditionNuoHeRuiBeforeBreakfast");
			this.Property(t => t.AdditionNuoHeRuiBeforeLunch).HasColumnName("AdditionNuoHeRuiBeforeLunch");
			this.Property(t => t.AdditionNuoHeRuiBeforeDinner).HasColumnName("AdditionNuoHeRuiBeforeDinner");
			this.Property(t => t.AdditionNuoHePing).HasColumnName("AdditionNuoHePing");
			this.Property(t => t.AdditionCaseQiTa).HasColumnName("AdditionCaseQiTa");
			this.Property(t => t.AdditionLowBloodSugarFrequence).HasColumnName("AdditionLowBloodSugarFrequence");
			this.Property(t => t.StatusAudit).HasColumnName("StatusAudit");
			this.Property(t => t.StatusComplete).HasColumnName("StatusComplete");
		}
	}
}

